﻿
using System;
using System.Windows.Forms;

namespace GECS.Input {

	/// <summary>
	/// This class can be used to note keyboard input from any class. The values
	/// are automatically updated by the GInput class.
	/// </summary>
    public class GKeyBoard {

		/// <summary>
		/// Sets the detection type of a key.
		/// </summary>
		/// <param name="keyCode">The Keys enum value.</param>
		/// <param name="b">The input behaviour.</param>
        public static void SetDetectionType(Keys keyCode, GInput.Behaviour b) {
			GInput.KEY_ACTIONS[(int)keyCode].DetectionType = b;
        }
		
		/// <summary>
		/// Check if a key has been pressed.
		/// </summary>
		/// <param name="keyCode">The Keys enum value.</param>
		/// <returns>True if pressed. Else False.</returns>
		public static bool IsPressed(Keys keyCode){
			return GInput.KEY_ACTIONS[(int)keyCode].IsPressed();
		}

    }

}
